

struct a{
	unsigned char ucA;
	unsigned short usB;
	unsigned int uiC;
};


struct b{
	unsigned char ucA;
	unsigned short usB;
	unsigned int uiC;
};


void delay(int a, unsigned int b, unsigned int c, unsigned int d, unsigned int e, unsigned int f)
{
	unsigned char aucBuf[10U] = {0};
	unsigned char ucIn = 0U;
	unsigned short usIn = 0x55AAU;
	struct b stB;
	struct a stA = {0};
	
	aucBuf[0] = 0U;
	
	a = 1;
	b = 1U;
	c = 0U;
	d = 0U;
	e = 0U;
	f = 0U;
	
	return;
}

int main(void)
{
	/* 定义指向寄存器指针 */
	unsigned int *pLed1Pin = (unsigned int *)0x44E10878;
	unsigned int *pLed2Pin = (unsigned int *)0x44E1087C;
	unsigned int *pLed3Pin = (unsigned int *)0x44E10808;
	unsigned int *pGpioCon = (unsigned int *)0x4804C134;
	unsigned int *pGpioDatH = (unsigned int *)0x4804C194;
	unsigned int *pGpioDatL = (unsigned int *)0x4804C190;
	
	/* 赋值,配置管脚复用模式 */
	*pLed1Pin = 0x00040007U;
	*pLed2Pin = 0x00040007U;
	*pLed3Pin = 0x00040007U;
	
	/* 设置为输出管脚  将寄存器REG_GPIO1_BA(0x4804C000U + 0x134)的第28/29/2位清零 */
	*pGpioCon &= ~((1 << 2) | (1 << 28) | (1 << 29));
	
	/* 向IO管脚写高电平
     * 将寄存器(0x4804C000U + 0x194)的第28/29/2位置1
     * 向IO管脚写低电平
     * 将寄存器(0x4804C000U + 0x190)的第28/29/2位置1	
     */
	*pGpioDatL |= ((1 << 2) | (1 << 28) | (1 << 29));
	
	delay(0, 1, 2, 3, 4, 5);
	
	return 0;
}